]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
quickSettings: Add getFirstItem() method
authorFlorian Müllner <fmuellner@gnome.org>
Mon, 14 Aug 2023 22:13:34 +0000 (00:13 +0200)
committerFlorian Müllner <fmuellner@gnome.org>
Sat, 19 Aug 2023 23:54:09 +0000 (01:54 +0200)
We will need some more access to the menu's underlying grid to
provide extension API for adding additional quick items.

Expose a new getFirstItem() method that (surprise!) returns the
first item.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2894>

js/ui/quickSettings.js

index c684141f757b7003ada7804c72cfbf241cf2fe48..1bc84a012472041f30f3df893359794fd49db3b3 100644 (file)
@@ -802,6 +802,10 @@ export const QuickSettingsMenu = class extends PopupMenu.PopupMenu {
         }
     }
 
+    getFirstItem() {
+        return this._grid.get_first_child();
+    }
+
     open(animate) {
         this.actor.show();
         super.open(animate);